<!-- saved from url=(0022)http://internet.e-mail -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Structured Control Introduction</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body class="text">
<p class="heading">Structured Control - Introduction <br>
<hr noshade>
<p>In assembly language, commands such as CMP and Bcc (branch
instruction) can be used to implement the If, While, Until, and For statements of
higher level languages.&nbsp; However, use of these commands to create
rudimentary structured control is often time consuming and complicated.&nbsp;
The EASy68K assembler accepts certain structured language statements and translates 
them into their equivalent CMP and Bcc statements. These statements do affect 
the condition code register.</p>
<p class="subheading">===Keywords for Structured Control===</p>
<p>The following keywords are reserved for structured syntax:</p>
<p class="sourcecode">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
DBLOOP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ENDF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ENDI<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ENDW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FOR<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
REPEAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UNLESS<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UNTIL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHILE</p>
<p>&nbsp;</p>
<p>The following keywords are used in the structured syntax but are
not reserved:</p>
<p class="sourcecode">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DOWNTO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TO<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OR<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;THEN</p>
<p>Note that AND and OR are reserved instruction mnemonics,
however.</p>
<p>The five Structured Control statements, <b>DBloop</b>, <b>If</b>, <b>While</b>, 
  <b>Until</b>, and <b>For</b> are discussed later in this section.</p>
<p><b>Legend:<br>
</b>&nbsp; optional items are shown in brackets []<br>
&nbsp; <b><i>op</i></b> is any valid operand<br>
&nbsp; <b><i>code</i></b> is any number of lines of 68000 code<br>
&nbsp; <b><i>size</i></b> is specified by one of the following: B, W or L for 
byte, word or long respectively<br>
&nbsp; <b><i>expression</i></b> is any valid conditional expression<br>
&nbsp; <b><i>extent</i></b> is specified by one of the following: S or L for 
short or long respectively </p>
<p>NOTE! The assembler creates and adds labels to your program in 
order to implement the structured control statements. These labels all begin 
with an underscore '_' and are followed by an eight digit hexadecimal number. 
User created labels should not start with an underscore in order to avoid 
errors.</p>
<p>&nbsp;</p>
</body>
</html>